package com.example.hzly.dto;

import lombok.Data;

import java.sql.Date;
import java.util.List;

@Data
public class StoryDTO {
    private Long id;
    private String title;
    private String excerpt;
    private String content;
    private String category;
    private String coverImage;
    private AuthorDTO author;
    private Destination destination;
    private Date publishDate;
    private Date updateDate;
    private Integer views;
    private Integer likes;
    private List<String> tags;
    private List<CommentDTO> comments;
    private List<RelatedStoryDTO> relatedStories;
    private Integer status;
    private Long parentId;

    @Data
    public static class Destination {
        private Long id;
        private String name;
        private String description;
        private String location;
        private String imageUrl;
    }

    @Data
    public static class AuthorDTO {
        private Long id;
        private String name;
        private String avatar;
        private String description;
    }

    @Data
    public static class CommentDTO {
        private Long id;
        private UserDTO user;
        private String content;
        private Date createTime;
        private Integer likes;
        private Long parentId;
        private List<CommentDTO> replies;
    }

    @Data
    public static class UserDTO {
        private Long id;
        private String name;
        private String avatar;
    }

    @Data
    public static class RelatedStoryDTO {
        private Long id;
        private String title;
        private String excerpt;
        private String coverImage;
        private String authorName;
    }
}